// Copyright 2007-2008 The SharpSvn Project
//
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
//  You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.

#pragma once

namespace SharpSvn {

    /// <summary>Extended Parameter container of <see cref="SvnClient::Add(String^, SvnAddArgs^)" /></summary>
    /// <threadsafety static="true" instance="false"/>
    public ref class SvnAddArgs : public SvnClientArgs
    {
        SvnDepth _depth;
        bool _noIgnore;
        bool _noAutoProps;
        bool _force;
        bool _addParents;

    public:
        SvnAddArgs()
        {
            _depth = SvnDepth::Infinity;
        }

        virtual property SvnCommandType CommandType
        {
            virtual SvnCommandType get() override sealed
            {
                return SvnCommandType::Add;
            }
        }

        property SvnDepth Depth
        {
            SvnDepth get()
            {
                return _depth;
            }
            void set(SvnDepth value)
            {
                _depth = EnumVerifier::Verify(value);
            }
        }

        property bool NoIgnore
        {
            bool get()
            {
                return _noIgnore;
            }
            void set(bool value)
            {
                _noIgnore = value;
            }
        }

        property bool NoAutoProps
        {
            bool get()
            {
                return _noAutoProps;
            }
            void set(bool value)
            {
                _noAutoProps = value;
            }
        }

        /// <summary>If force is not set and path is already under version control, return the error
        /// SVN_ERR_ENTRY_EXISTS. If force is set, do not error on already-versioned items. When used
        /// on a directory in conjunction with the recursive flag, this has the effect of scheduling
        /// for addition unversioned files and directories scattered deep within a versioned tree.</summary>
        property bool Force
        {
            bool get()
            {
                return _force;
            }
            void set(bool value)
            {
                _force = value;
            }
        }

        /// <summary>
        /// If TRUE, recurse up path's directory and look for
        /// a versioned directory.  If found, add all intermediate paths between it
        /// and path.  If not found, fail with SVN_ERR_CLIENT_NO_VERSIONED_PARENTS.
        /// </summary>
        property bool AddParents
        {
            bool get()
            {
                return _addParents;
            }
            void set(bool value)
            {
                _addParents = value;
            }
        }
    };
}
